package com.ucar.training.controller;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author XiongMM
 * @date 2019/7/18 下午8:29
 * @description
 *
 * 为用户提供注册的用户界面的Servlet
 * RegisterUIServlet负责为用户输出注册界面
 * 当用户访问RegisterUIServlet时，就跳转到WEB-INF/pages目录下的register.jsp页面
 */
public class RegisterUIServlet extends HttpServlet {

    @Override
    public void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        request.getRequestDispatcher("/register.jsp").forward(request, response);
    }

    @Override
    public void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        doGet(request, response);
    }

}
